<template>
  <div class="page_root" id="root_index">
    <div class="warp">
      <div class="container-fluid">
        <el-row>
          <el-col :span="4">
            <div_label
              bg_color="bg_purple"
              icon="el-icon-user-solid"
              :url="url_user_count"
              unit="人"
              title="用户数量"
            ></div_label>
          </el-col>
        </el-row>

        <el-row> </el-row>
      </div>
    </div>
  </div>
</template>
<script>
import mixin from '@/mixins/page.js'
import div_label from '@/components/div_label.vue'
export default {
  mixins: [mixin],
  name: 'Home',
  components: {
    div_label,
  },
  data() {
    return {
      activeName: 'third',
      url_user_count: '~/api/user/count?',
      url_article_hits: '~/api/article/sum?field=hits',
    }
  },
  created() {},
  mounted() {},
  methods: {
    async get_nickname(list, flag) {
      if (flag) {
        for (let i = 0; i < list.length; i++) {
          await this.$get(
            '~/api/user/get_obj?user_id=' + list[i],
            null,
            json => {
              if (json.result) {
                list[i] = json.result.obj.nickname
              }
            }
          )
        }
      } else {
        for (let i = 0; i < list.length; i++) {
          await this.$get(
            '~/api/user/get_obj?user_id=' + list[i].name,
            null,
            json => {
              if (json.result) {
                list[i].name = json.result.obj.nickname
              }
            }
          )
        }
      }
    },
  },
  computed: {
    recognitionHeight() {
      return '830px'
    },
    recognitionUrl() {
      return 'https://www.faceplusplus.com.cn/${model.filter.recognitionType}/'
    },
  },
}
</script>

<style scoped="scoped">
.chart {
  display: block;
  width: 100%;
  height: 400px;
  padding: 1rem;
  position: relative;
}

.el-col {
  padding: 0.5rem;
}

.card {
  overflow: hidden;
}

.iframe_box,
.iframe_box_change {
  width: 100%;
  height: 1180px;
  position: relative;
  margin-top: 25px;
}
.iframe_box_change {
  height: 580px;
  padding-top: 50px;
}
.iframe_box .iframe_box_content,
.iframe_box_change .iframe_box_content {
  width: 100%;
  height: 100%;
}
.iframe_box_top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  font-size: 25px;
  line-height: 100px;
  background: #fff;
  z-index: 99999999;
  padding-left: 50px;
}
#iframe_box_face div::before {
  content: '';
  width: 100px;
  position: absolute;
  top: 154px;
  right: 129px;
  z-index: 999;
  height: 20px;
  background-color: #ffffff;
}

#iframe_box_face > h1 {
  margin-top: 100px;
  margin-bottom: 20px;
}
</style>
